-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Add target_feature = "gc" for Wasm
#150111
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
|
Ah, 'tis unfortunate, will have to wait until the next LLVM version. |
|
Looks good to me, thanks! You can update this function to skip the feature on unsupported LLVM versions. Do you have a use case in mind for the insta-stable-ness? I would expect that the GC configuration for wasm-bindgen would be out-of-band rather than via a compiler configuration (e.g. an extra flag to wasm-bindgen itself) |
In the meantime of course |
Done. |
|
What would you think about landing this unstable and having a follow-up PR to switch it to stable? That'd help and get this in without merge conflicts and it can be separated from the FCP required for stabilization too. I'm not actually certain myself which team would need to sign off on this, T-lang or T-compiler, in terms of stabilization |
Yeah, why not! I will open a follow-up PR right away for stabilization so we can get that rolling in the meantime until LLVM 22 is released (a long way off probably). |
|
@bors: r+ |
|
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 806c2a3 (parent) -> 9044e98 (this PR) Test differencesShow 3 test diffs3 doctest diffs were found. These are ignored, as they are noisy. Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 9044e98b66d074e7f88b1d4cea58bb0538f2eda6 --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (9044e98): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 6.9%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -7.1%, secondary -4.8%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 477.964s -> 478.41s (0.09%) |
This PR adds a new target feature for Wasm targets: GC.
I went ahead and made this insta-stable because it has already passed phase 5 in addition to being implemented and stabilized by all major JS engines.This doesn't enable the target feature by default!For context: while this proposal adds a lot of new features to Wasm, they are not accessible through Rust apart from unstable inline ASM. This is largely useful to signal tools to make use of the feature, e.g.
wasm-bindgen, where this can be used to make some pretty optimizations.Companion PR: rust-lang/reference#2114.
r? @alexcrichton